/**
 * 对消息进行预处理
 * @param app
 * @returns {(function(*, *): Promise<void>)|*}
 */
module.exports = app => {
  return async (ctx, next) => {
    // console.log(ctx)
    ctx.socket.emit('res', `server >> ${ctx.socket.id} packet received!`)
    console.log('server >> packet >> ', ctx.packet)
    await next()
  }
}